package com.gitee.kamismile.gatewayWeb.component.common;

import io.netty.channel.ChannelId;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurrent.GlobalEventExecutor;
import io.netty.util.internal.PlatformDependent;

import java.util.concurrent.ConcurrentMap;

/**
 * Created by lidong on 2017/3/2.
 */
public class APPWSChannel {
    public static final ChannelGroup channels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

    /**
     * channel-channelId
     */
    public static final ConcurrentMap<String, ChannelId> channelsText = PlatformDependent.newConcurrentHashMap();

    /**
     * channel - token
     */
    public static final ConcurrentMap<String, String> channelTokens = PlatformDependent.newConcurrentHashMap();

    /**
     * token - channel
     */
    public static final ConcurrentMap<String, String> tokenChannels = PlatformDependent.newConcurrentHashMap();
}
